/*
 *  图形绘制
 */
#include "view.h"
#include "view_def.h"

int32_t View::Draw()
{
    DrawShape();
    DrawPicture();
    DrawText();
    return 0;
}

int32_t View::DrawShape()
{
    m_imageGrid.Clear(m_info.shapeColor, m_shapeX, m_shapeY, m_shapeWidth, m_shapeHeight);
    return 0;
}

int32_t View::DrawPicture()
{
    return 0;
}

int32_t View::DrawText()
{
    ImageGrid imgTmp = ImageGrid(
        m_imageGrid, m_shapeX, m_shapeY, m_shapeWidth, m_shapeHeight);

    ViewFont::GetVF()->Print(
        m_info.text.GetString(),
        m_info.textFont,
        m_info.textSize,
        m_info.textBold,
        m_info.textDegree,
        true,
        imgTmp,
        m_info.textColor,
        m_textXErr,
        m_textYErr,
        m_info.textSpaceX,
        m_info.textSpaceY,
        m_info.textAutoEnter);

    return 0;
}
